package day1009;

import java.util.Scanner;

public class Ques1020QuickSort {
	public void quickSort(int arr[],int n){
		this.quickSort(arr,0,n-1);
	}
	
	private void quickSort(int arr[],int l,int r){
		if(l >= r)
			return;
		
		int p = partition(arr,l,r);
		this.quickSort(arr,l,p-1);
		this.quickSort(arr,p+1,r);
	}
	
	private int partition(int arr[],int l,int r){
		int v = arr[l];
		
		int j = l;
		for( int i = l + 1; i <= r ; i ++ ){
			if(arr[i] < v){
				this.swap(arr,++j,i);
			}
		}
		this.swap(arr, l, j);
		return j;
	}
	
	private void swap(int[] arr,int i,int j){
		int temp = arr[i];
		arr[i] = arr[j];
		arr[j] = temp;
	}
	
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = 0;
		int[] scoreList;
		while(scan.hasNext()){
			n = scan.nextInt();
			scoreList = new int[n];
			for(int i = 0;i < n;i++){
				scoreList[i] = scan.nextInt();
			}
			new Ques1020QuickSort().quickSort(scoreList, n);
			String result = "";
			for(int i = n - 1;i >= 0;i --){
				result += scoreList[i] + " ";
			}
			System.out.println(result.substring(0,result.length()-1));
		}
	}
}
